confluence-mdx: xhtml_patcher에서 <strong> 뒤 조사 앞 공백 제거 처리#821
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
keIIy-kim
approved these changes
Feb 19, 2026
<strong>IDENTIFIER</strong> 뒤 텍스트 노드의 leading whitespace가 diff에서 삭제된 경우, xhtml_patcher가 해당 공백을 제거하지 못하는 버그를 수정합니다. 직전 텍스트 노드 범위와 현재 텍스트 노드 범위 사이의 gap이 diff로 삭제된 경우(gap_new == ''), leading whitespace를 제거하도록 수정합니다. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
83ca18c to
2cc22b1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
_apply_text_changes()에서<strong>IDENTIFIER</strong> 를패턴의 공백 제거 버그를 수정합니다.배경
Confluence XHTML에서
<h3>Q: 운영 도중 <strong>AGENT_SECRET</strong> 를 변경해도...</h3>형태의 구조를 패치할 때,<strong>다음 텍스트 노드(를)의 leading whitespace가 diff에서 삭제 대상이더라도 기존 코드는 이 공백을 항상 보존했습니다.원인 분석
_apply_text_changes()의 텍스트 노드 처리에서:old_stripped에서 텍스트 노드 간 gap(AGENT_SECRET와를사이 공백)은 별도 인덱스 위치에 존재node_start~node_end범위에도 포함되지 않아 opcode가 처리되지 않음수정 내용
현재 노드 처리 시 직전 노드 범위와 현재 노드 범위 사이의 gap을
_map_text_range()로 검사합니다. gap이 diff로 완전히 삭제된 경우(gap_new == ''), leading whitespace를 제거합니다.Test plan
test_remove_space_before_korean_particle_after_strong신규 테스트 통과pytest tests/test_reverse_sync_xhtml_patcher.py)🤖 Generated with Claude Code